package com.e3.sysmg.security.client;

import java.util.List;

import com.e3.sysmg.security.model.UserModel;
import com.e3.sysmg.security.model.UserQC;
import com.e3.web.core.client.RPCServiceHelper;
import com.e3.web.core.client.WebException;
import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.rpc.RemoteService;

public interface UserRPCService extends RemoteService {
	public static class Util {
		private static UserRPCServiceAsync instance;
		public static UserRPCServiceAsync getInstance(){
			instance = (UserRPCServiceAsync)RPCServiceHelper.getService(UserRPCService.class.getName());
			if(instance == null){
				instance = GWT.create(UserRPCService.class);
				RPCServiceHelper.registerServiceEntryPoint(instance);
			}
			return instance;
		}
	}

	public UserModel newUser(final UserModel userModel) throws WebException;
	
	public UserModel modifyUser(final UserModel userModel) throws WebException;
	
	public void deleterUsers(final List<UserModel> userModels) throws WebException;
	
	public List<UserModel> getUserByCondition(final UserQC qc) throws WebException;
	
}
